package com.dstz.demo.rest.controller;

import com.dstz.base.rest.BaseController;
import com.dstz.demo.core.manager.AclParameterManager;
import com.dstz.demo.core.model.AclParameter;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/sys/AclParameter")
public class AclParameterController extends BaseController<AclParameter> {
    @Resource
    AclParameterManager aclParameterManager;
    @Override
    protected String getModelDesc() {
        return null;
    }

    @GetMapping("/lists/{id}")
    public Map<String,Object> lists(@PathVariable("id") String id){
        Map<String,Object> map=new HashMap<>();
        List<AclParameter> list1= aclParameterManager.lists(id,"dbz");
        List<AclParameter> list2= aclParameterManager.lists(id,"zbz");
        List<AclParameter> list3= aclParameterManager.lists(id,"gbz");
        map.put("低标准",list1);
        map.put("中标准",list2);
        map.put("高标准",list3);
        return map;
    }
}
